package com.grizz.snake.controller.factory;

import org.newdawn.slick.SlickException;

import com.grizz.snake.Game;
import com.grizz.snake.controller.Mediator;

public class MediatorFactory {
	public Mediator getFullySetUpMediator(Game game) throws SlickException{
		Mediator mediator = new Mediator();
		EntityFactory entityFactory = new EntityFactory(mediator);
		
		mediator.register(game);
		mediator.register(entityFactory.getInputController());
		mediator.register(entityFactory.getMap());
		mediator.register(entityFactory.getMovementService());
		mediator.register(entityFactory.getSnake());
		mediator.register(entityFactory.getFood());
		
		return mediator;
	}
}
